\documentclass[12pt,letterpaper]{article}
\usepackage{geometry} % see geometry.pdf on how to lay out the page. There's lots.
%\geometry{a4paper} % or letter or a5paper or ... etc
% \geometry{landscape} % rotated page geometry

%% LaTeX - Article customise

%%% PACKAGES
\usepackage{booktabs} % for much better looking tables
\usepackage{array} % for better arrays (eg matrices) in maths
\usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
\usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
\usepackage{subfigure} % make it possible to include more than one captioned figure/table in a single float
% These packages are all incorporated in the memoir class to one degree or another...

%%% PAGE DIMENSIONS
\usepackage{geometry} % to change the page dimensions
%\geometry{margins=2cm} % for example, change the margins to 2 inches all round
%\geometry{landscape} % set up the page for landscape
% read geometry.pdf for detailed page layout information

%%% HEADERS & FOOTERS
\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
\pagestyle{fancy} % options: empty , plain , fancy
\renewcommand{\headrulewidth}{0pt} % customise the layout...
\lhead{}\chead{}\rhead{}
\lfoot{}\cfoot{\thepage}\rfoot{}

%%%% SECTION TITLE APPEARANCE
%\usepackage{sectsty}
%\allsectionsfont{\sffamily\mdseries\upshape} % (See the fntguide.pdf for font help)
%% (This matches ConTeXt defaults)

%% LaTeX Preamble - Common packages

\usepackage[utf8]{inputenc} % Any characters can be typed directly from the keyboard, eg éçñ
\usepackage{textcomp} % provide lots of new symbols
\usepackage{graphicx}  % Add graphics capabilities
%\usepackage{epstopdf} % to include .eps graphics files with pdfLaTeX
\usepackage{flafter}  % Don't place floats before their definition
%\usepackage{topcapt}   % Define \topcation for placing captions above tables (not in gwTeX)
\usepackage{natbib} % use author/date bibliographic citations

\usepackage{amsmath,amssymb}  % Better maths support & more symbols
\usepackage{bm}  % Define \bm{} to use bold math fonts

\usepackage[pdftex,bookmarks,colorlinks,breaklinks]{hyperref}  % PDF hyperlinks, with coloured links
%\definecolor{dullmagenta}{rgb}{0.4,0,0.4}   % #660066
%\definecolor{darkblue}{rgb}{0,0,0.4}
%\hypersetup{linkcolor=red,citecolor=blue,filecolor=dullmagenta,urlcolor=darkblue} % coloured links
%%\hypersetup{linkcolor=black,citecolor=black,filecolor=black,urlcolor=black} % black links, for printed output

\usepackage{memhfixc}  % remove conflict between the memoir class & hyperref
% \usepackage[activate]{pdfcprot}  % Turn on margin kerning (not in gwTeX)
\usepackage{pdfsync}  % enable tex source and pdf output syncronicity

% Defining Itemized List Levels
\renewcommand{\labelitemi}{$-$}
%\renewcommand{\labelitemii}{$\cdot$}
%\renewcommand{\labelitemiii}{$\diamond$}
%\renewcommand{\labelitemiv}{$\ast$}

% Better margins
\usepackage{fullpage}

% Matlab code includer
% load package with ``framed'' and ``numbered'' option.
\usepackage[framed,numbered,autolinebreaks,useliterate]{mcode}

%%% BEGIN DOCUMENT
\begin{document}

% Maybe \noindent

\begin{center}
\huge
NTRT Scaling Analysis work\\
\normalsize
%\vspace{0.1in}
Andrew P. (Drew) Sabelhaus\\
apsabelhaus@berkeley.edu
\end{center}

\vspace{-2em}

\section{Nonlinear system example}

In this example system, there is a rod on a hinge (hinge at (x,y) = (0,0) ) with length $l$.
There is an angular (rotational) spring, and an angular damper, acting at the origin also.
Gravity is present, and we assume it acts fully at the center of mass for the rod.

With the state variables for this system being

\[
x = [\theta, \dot \theta]^\top
\]

The rod makes a triangle with the x-axis and the vertical, and the spring makes a triangle with the y-axis and a horizontal axis drawn from the top of the rod.

This top triangle has dimensions

\[
(l_{horiz-top}, l_{vert-top}) = (l cos \theta, h_s - l sin\theta)
\]

The length of the spring (the hypotenuse of this top triangle) is then

\[
x_s = \sqrt( l^2 cos^2\theta + (h_s - l sin \theta)^2)
\]

For a given $\theta$, the force from the spring onto the rod can then be decomposed into the following, assuming that $x_{s0}$ is the rest length of the spring, and we let $\theta_2$ be the acute angle in the upper triangle close to the rod end:

\[
F_{spring} = k x_s = \sqrt( l^2 cos^2\theta + (h_s - l sin \theta)^2)
\]
\[
F_{s_x} = F_{spring} cos \theta_2 = F_{spring} \frac{ l cos\theta }{ x_s } = (k)(l)cos\theta
\]
\[
F_{s_y} = F_{spring} sin \theta_2 = F_{spring} \frac{ h_s - l sin\theta}{ x_s} = (k) (h_s - l sin\theta)
\]

So, then, by Newton's 3rd law, our rigid body dynamics are:
\[
\sum T = I \ddot \theta, (mg)(\frac{m}{2} sin\theta) - F_{s_x} l sin\theta - F_{s_y} l cos\theta = I \ddot \theta
\]

For a solid rod,
\[
I = \frac{m l^3}{3}
\]

\end{document}
